<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('达标台均列表')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <label style="width: 130px;">服务商编号：</label>
                                <input type="text" name="agentNum"/>
                            </li>
                            <li>
                                <label style="width: 130px;">服务商名称：</label>
                                <input type="text" name="agentName"/>
                            </li>
                            <li >
                                <label style="width: 130px;">所属资深总监编号：</label>
                                <input type="text" name="belongAgent"/>
                            </li>
                            <li >
                                <label style="width: 130px;">所属资深总监名称：</label>
                                <input type="text" name="belongName"/>
                            </li>
                            <li>
                                <label style="width: 130px;">终端类型：</label>
                                <select name="dqType" th:with="type=${@dict.getType('terminal_type')}">
                                    <option value="-1">所有</option>
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                </select>
                            </li>
                            <li class="select-time">
                                <label style="width: 130px">添加日期：</label>
                                <input type="text" readonly class="time-input"      placeholder="开始时间" name="start"/>
                                <span>-</span>
                                <input type="text" readonly class="time-input"      placeholder="结束时间" name="end"/>
                            </li>
                            <li class="select-time">
                                <label style="width: 130px">所属月：</label>
                                <input type="text"  readonly    placeholder="开始时间" id="startDay" name="startDay"/>
                                <span>-</span>
                                <input type="text"  readonly    placeholder="结束时间" id="endDay"  name="endDay"/>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
               <!-- <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="AgentMonthStandard:standard:add">
                    <i class="fa fa-plus"></i> 添加
                </a>
                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="AgentMonthStandard:standard:edit">
                    <i class="fa fa-edit"></i> 修改
                </a>
                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="AgentMonthStandard:standard:remove">
                    <i class="fa fa-remove"></i> 删除
                </a>-->
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="AgentMonthStandard:standard:export">
                    <i class="fa fa-download"></i> 导出
                </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table" class="table text-nowrap"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
     <script th:inline="javascript">
         var datas1 = [[${@dict.getType('terminal_type')}]];
         var editFlag = [[${@permission.hasPermi('AgentMonthStandard:standard:edit')}]];
         var removeFlag = [[${@permission.hasPermi('AgentMonthStandard:standard:remove')}]];
         var prefix = ctx + "AgentMonthStandard/standard";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "达标台均",
                columns: [{
                    checkbox: true
                },
                {
                    field: 'id',
                    title: '主键',
                    visible: false
                },
                {
                    field: 'agentNum',
                    title: '服务商编号'
                },
                {
                    field: 'agentName',
                    title: '服务商名称'
                },
                {
                    field: 'dqType',
                    title: '终端类型',
                    formatter: function (value, row, index) {
                        return $.table.selectDictLabel(datas1, value);
                    }
                },
                {
                    field: 'belongAgent',
                    title: '所属资深总监编号'
                },
                {
                    field: 'belongName',
                    title: '所属资深总监名称'
                },
                {
                    field: 'money',
                    title: '交易总额'
                },
                {
                    field: 'activeCount',
                    title: '激活台数'
                },
              /*  {
                    field: 'monthDay',
                    title: '所属月'
                },*/
                {
                    field: 'addDate',
                    title: '添加日期'
                },
              /*  {
                    field: 'addMan',
                    title: '添加人'
                },*/
                {
                    field: 'standardMoney',
                    title: '台均交易额'
                },
               /* {
                    field: 'note',
                    title: '备注'
                },*/
                /*{
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }*/]
            };
            $.table.init(options);
        });

       $("input[name='startDay']").datetimepicker({
            format: "yyyy-mm",
           minView: "month",
           autoclose: true
        });

        $("input[name='endDay']").datetimepicker({
            format: "yyyy-mm",
            minView: "month",
            autoclose: true
        });



        $(function () {
            layui.use('laydate', function(){
                var laydate = layui.laydate;
                laydate.render({
                    elem: '#start'
                    ,type: 'month'
                });
                laydate.render({
                    elem: '#end'
                    ,type: 'month'
                });
            });
        });

    </script>
</body>
</html>